// 模块全部的getters写在此处
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 方便全局引用token
  token: state => state.user.token,
  // 用户名
  name: state => state.user.userInfo.username,
  // 用户ID
  userId: state => state.user.userInfo.userId,
  // 用户头像
  staffPhoto: state => state.user.userInfo.staffPhoto,
  // 建立对于user模块的companyId的快捷访问
  companyId: state => state.user.userInfo.companyId,
  // 用户所有的路由，静态路由+权限动态路由
  routes: state => state.permission.routes
}
export default getters
